<%@page import="com.wanmait.cookBook.vo.Userinfo"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%String path =request.getContextPath();%>

<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改密码 -爱下厨</title>
<meta name="renderer" content="webkit">
<meta name="keywords" content="">
<meta name="description" content="" />
<link rel="shortcut icon" href="https://static.meishichina.com/v6/img/lib/f.ico"/>
<link rel="apple-touch-icon" href="https://static.meishichina.com/v6/img/lib/wapico.png" />
<link rel="stylesheet" type="text/css" href="https://static.meishichina.com/v6/css/lib/all.css?v1=13">
<link rel="stylesheet" type="text/css" href="https://static.meishichina.com/v6/css/app/center/all.css?v1=2017-08-17">
</head>
<body>
<!-- 主框架 -->
<div class="w_main clear">

    <div class="mod_left">
        <div class="menu_wrap">
<ul>
<li>
<a class=on href="<%=path%>/front/personal.jsp">用户<br>中心</a>
</li>
<li>
<a  href="<%=path%>/CookServlet">个人<br>菜谱</a>
</li>

<li>
<a   href="<%=path%>/front/upDiary.jsp">日志</a>
</li>
<li>
<a  href="<%=path%>/getAllTasteServlet">发布<br>作品</a>
</li>
<li>
<a  href="<%=path%>/front/set.jsp">账户<br>设置</a>
</li>
</ul>
</div>
    </div>


</div>
 <!-- 右侧 -->
<div class="mod_right">
<div id="mod_location">
<div class="mod_location clear">
<div class="left">
<a href="<%=path %>/front/set.jsp" ">个人资料</a>
<a href="javascript:void(0)" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a><!-- 中间的空格 -->
<a href="<%=path %>/front/changePass.jsp" class="on" >修改密码</a>
</div>
</div>
</div>
<form action="<%=path %>/UserinfoServlet?action=changePass" id="J_form"   method="post">

<div class="mr_edit mr_edit_center clear">
<ul>
	<li>
<label>当前密码</label><br>
<%Userinfo loginuser=(Userinfo)session.getAttribute("loginuser"); %>
<input type="hidden" id="yinCang" value="<%=loginuser.getUserPass()%>">


<input class="inputS" id="J_password" name="loginPass" type="password" autocomplete="off">
</li>
<li>
<label>新密码</label><br>
<input class="inputS" id="J_password_new" name="newpassword1" type="password" autocomplete="off">&nbsp;&nbsp;<span class="tip">密码为5-15个字符</span>
</li>

<li>
<label>确认密码</label><br>
<input class="inputS" id="J_password_new_2" name="newpassword2" type="password" autocomplete="off">
</li>

</ul>
<input name="submit" value="保存修改" class="btn1" type="submit">

</div>

<div class="mr_edit mr_edit_fixed clear">
<ul>
</ul>
</div>

</form>
		</div><!-- 右侧结束 -->
</div>
<script type="text/javascript" src="<%=path %>/front/js/jquery-3.5.1.min.js"></script>
<script type="text/javascript" src="//static.meishichina.com/v6/js/lib/all.js?v1=20180922"></script>
<script type="text/javascript">
msc.user.init();
$("img.imgLoad").imgLoad();
</script>
<script type="text/javascript">
$("#J_form").submit(function(){
	var loginpass=$("#J_password").val();
	var yinCang=$("#yinCang").val();
	if(loginpass!=yinCang){
		msc.ui.dialog.error('当前密码错误');
		return false;
	}
if($('#J_password').length>0 && $('#J_password').val()==''){
msc.ui.dialog.error('请输入当前密码');
$("#J_password").focus();
}else if($('#J_password_new').val()==''){
msc.ui.dialog.error('请输入新密码');
$('#J_password_new').focus();
}else if($('#J_password_new').val().length < 5 || $('#J_password_new').val().length > 15){
msc.ui.dialog.error('密码为5-15个字符');
$('#J_password_new').val('').focus();
}else if($('#J_password_new_2').val()==''){
msc.ui.dialog.error('请确认密码');
$('#J_password_new_2').focus();
}else if($('#J_password_new').val()!=$('#J_password_new_2').val()){
msc.ui.dialog.error('确认密码不一样');
}else{
msc.ui.dialog.loading();
return true;
}

return false;
});
</script>
<script>
$("li.top_bar_more").hoverDelay(function(){$("li.top_bar_more div").show()},function(){$("li.top_bar_more div").hide()},200,200);var _hmt=_hmt||[];(function(){var hm=document.createElement("script");hm.src="//hm.baidu.com/hm.js?fb9cd9dcdda23cee0c7357db9be24acb";var s=document.getElementsByTagName("script")[0];s.parentNode.insertBefore(hm,s)})();
</script> </body>
</html>
